/**
 * 
 */
package com.faxsun.core.persist.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * @author leima
 * 
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "fx_followlist")
public class FollowListPO implements Serializable{
   
    private static final long serialVersionUID = 4834759226857303570L;

    @Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private long id;

    private long uid;
    
	@Column(name = "FOLLOWER_ID")
	private long follower_id;

	/**0为user, 1为商品, 2为评测, 3为资讯文章，4为直播消息*/
	@Column(name = "item_type")
	private int item_type;
	
	@Column(name = "thumbsup")
	private boolean thumbsup = false;//not thumbsup-ed

	private int status = 1;//unfollowed
	
    public FollowListPO() {
        super();
    }
	
    public FollowListPO(long id, long uid, long followerId, int itemType, boolean thumbsup, int status) {
        super();
        this.id = id;
        this.uid = uid;
        this.follower_id = followerId;
        this.item_type = itemType;
        this.thumbsup = thumbsup;
        this.status = status;
    }
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getUid() {
        return uid;
    }

    public void setUid(long uid) {
        this.uid = uid;
    }
 
    public long getFollower_id() {
        return follower_id;
    }

    public void setFollower_id(long follower) {
        this.follower_id = follower;
    }

    public int getItem_type() {
        return item_type;
    }

    public void setItem_type(int itemType) {
        this.item_type = itemType;
    }    
    
    public boolean getThumbsup() {
        return thumbsup;
    }

    public void setThumbsup(boolean thumbsup) {
        this.thumbsup = thumbsup;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Override
	public String toString(){
	    return "FollowList: id=" + id + ",uid=" + uid + ",follower=" + follower_id
	            + ",item_type=" + item_type + ",thumbsup=" + thumbsup + ",status=" + status;
	}

}
